8037c658: 27 bd ff d0  ADDIU sp, sp, 0xffffffd0 (-48)
8037c65c: af bf 00 1c  SW ra, sp, 0x1c (28)
8037c660: af a4 00 30  SW a0, sp, 0x30 (48)
8037c664: af a5 00 34  SW a1, sp, 0x34 (52)
8037c668: af b0 00 18  SW s0, sp, 0x18 (24)

8037c66c: 0c 09 df d4  JAL 0x80277f50 (-2144895152)        [sp + 0x2c] = segmented_to_virtual(arg2);
8037c670: 8f a4 00 34  LW a0, sp, 0x34 (52)
8037c674: af a2 00 2c  SW v0, sp, 0x2c (44)

8037c678: 8f ae 00 2c  LW t6, sp, 0x2c (44)
8037c67c: 0c 09 df d4  JAL 0x80277f50 (-2144895152)        [sp + 0x28] = segmented_to_virtual(*[sp + 0x2c]);
8037c680: 8d c4 00 00  LW a0, t6, 0x0 (0)
8037c684: af a2 00 28  SW v0, sp, 0x28 (40)

8037c688: 8f af 00 30  LW t7, sp, 0x30 (48)
8037c68c: 8f b9 00 28  LW t9, sp, 0x28 (40)
8037c690: 8d f8 00 3c  LW t8, t7, 0x3c (60)
8037c694: 13 19 00 15  BEQ t9, t8, 0x8037c6ec (pc + 0x54)  if ([sp + 0x28] == arg1->off0x3c) goto 0x8037c6ec;
8037c698: 00 00 00 00  NOP

8037c69c: 8f a8 00 28  LW t0, sp, 0x28 (40)
8037c6a0: 8f a9 00 30  LW t1, sp, 0x30 (48)
8037c6a4: ad 28 00 3c  SW t0, t1, 0x3c (60)                arg1->off0x3c = [sp + 0x28];

8037c6a8: 8f aa 00 28  LW t2, sp, 0x28 (40)
8037c6ac: 85 4b 00 00  LH t3, t2, 0x0 (0)
8037c6b0: 31 6c 00 02  ANDI t4, t3, 0x2 (2)
8037c6b4: 11 80 00 03  BEQ r0, t4, 0x8037c6c4 (pc + 0xc)   if (([sp + 0x28]->off0x00 & 2) == 0) goto 0x8037c6c4;
8037c6b8: 00 00 00 00  NOP

8037c6bc: 10 00 00 02  BEQ r0, r0, 0x8037c6c8 (pc + 0x8)   s0 = 1;
8037c6c0: 24 10 00 01  ADDIU s0, r0, 0x1 (1)               goto 0x8037c6c8;

*
8037c6c4: 24 10 ff ff  ADDIU s0, r0, 0xffffffff (-1)       s0 = -1;

*
8037c6c8: 8f ad 00 28  LW t5, sp, 0x28 (40)
8037c6cc: 8f b8 00 30  LW t8, sp, 0x30 (48)
8037c6d0: 85 ae 00 04  LH t6, t5, 0x4 (4)
8037c6d4: 02 0e 78 21  ADDU t7, s0, t6
8037c6d8: a7 0f 00 40  SH t7, t8, 0x40 (64)                arg1->off0x40 = [sp + 0x28]->off0x04 + s0;

8037c6dc: 8f b9 00 30  LW t9, sp, 0x30 (48)
8037c6e0: af 20 00 48  SW r0, t9, 0x48 (72)                arg1->off0x48 = 0;

8037c6e4: 8f a8 00 30  LW t0, sp, 0x30 (48)
8037c6e8: a5 00 00 3a  SH r0, t0, 0x3a (58)                arg1->off0x3a = 0;

*
8037c6ec: 10 00 00 01  BEQ r0, r0, 0x8037c6f4 (pc + 0x4)
8037c6f0: 00 00 00 00  NOP
8037c6f4: 8f bf 00 1c  LW ra, sp, 0x1c (28)
8037c6f8: 8f b0 00 18  LW s0, sp, 0x18 (24)
8037c6fc: 27 bd 00 30  ADDIU sp, sp, 0x30 (48)
8037c700: 03 e0 00 08  JR ra
8037c704: 00 00 00 00  NOP


[sp + 0x2c] = segmented_to_virtual(arg2);
[sp + 0x28] = segmented_to_virtual(*[sp + 0x2c]);
if ([sp + 0x28] == arg1->off0x3c) goto 0x8037c6ec;
arg1->off0x3c = [sp + 0x28];
if (([sp + 0x28]->off0x00 & 2) == 0) goto 0x8037c6c4;
s0 = 1;
goto 0x8037c6c8;
8037c6c4:
s0 = -1;
8037c6c8:
arg1->off0x40 = [sp + 0x28]->off0x04 + s0;
arg1->off0x48 = 0;
arg1->off0x3a = 0;
8037c6ec:



[sp + 0x2c] = segmented_to_virtual(arg2);
[sp + 0x28] = segmented_to_virtual(*[sp + 0x2c]);
if ([sp + 0x28] != arg1->off0x3c) {
    arg1->off0x3c = [sp + 0x28];
    if ([sp + 0x28]->off0x00 & 2) {
        s0 = 1;
    } else {
        s0 = -1;
    }
    arg1->off0x40 = [sp + 0x28]->off0x04 + s0;
    arg1->off0x48 = 0;
    arg1->off0x3a = 0;
}




[sp + 0x2c] = segmented_to_virtual(arg2);
[sp + 0x28] = segmented_to_virtual(*[sp + 0x2c]);
if ([sp + 0x28] != arg1->off0x3c) {
    arg1->off0x3c = [sp + 0x28];
    arg1->off0x40 = [sp + 0x28]->off0x04 + ([sp + 0x28]->off0x00 & 2)? 1 : -1;
    arg1->off0x48 = 0;
    arg1->off0x3a = 0;
}
